package com.moyun.zbmy.zizhou.beans;

import android.text.TextUtils;

import com.moyun.zbmy.zizhou.application.Constances;
import com.moyun.zbmy.zizhou.ui.util.IListShowData;
import com.ruihang.generalibrary.ui.util.IListData;
import com.ruihang.generalibrary.utils.IShares;
import com.ruihang.generalibrary.utils.UrlUtils;

import java.io.Serializable;

/**
 * 广告数据
 */
public class NewAdvertisementBean implements Serializable, IListShowData,IShares {

    private int viewType;

    private int id;//": "13",
    private String type;//": "0",
    private String name;
    private String image;
    private String image219;
    private boolean isBig;
    private String contentImage;//": "/sctv/1/image/public/201906/20190610142924_d6p25ebv06.jpg",
    private String h5;//": ""
    private long createDate;
    private long views1;
    private long views2;
    private String source;
    private String ifDisplayAdvertisingWords = "0";//0 显示广告来源，1 不显示来源
    private String advertType;
    private int position;

    private boolean isShowTopDivider;
    private boolean isShowBottomDivider;


    public String getAdvertType() {
        return advertType;
    }

    public void setAdvertType(String advertType) {
        this.advertType = advertType;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getContentImage() {
        return contentImage;
    }

    public void setContentImage(String contentImage) {
        this.contentImage = contentImage;
    }

    public String getH5() {
        return h5;
    }

    public void setH5(String h5) {
        this.h5 = h5;
    }

    public long getCreateDate() {
        return createDate;
    }

    public void setCreateDate(long createDate) {
        this.createDate = createDate;
    }

    public long getViews1() {
        return views1;
    }

    public void setViews1(long views1) {
        this.views1 = views1;
    }

    public long getViews2() {
        return views2;
    }

    public void setViews2(long views2) {
        this.views2 = views2;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getIfDisplayAdvertisingWords() {
        return ifDisplayAdvertisingWords;
    }

    public void setIfDisplayAdvertisingWords(String ifDisplayAdvertisingWords) {
        this.ifDisplayAdvertisingWords = ifDisplayAdvertisingWords;
    }

    public int getViewType() {
        return viewType;
    }

    public void setViewType(int viewType) {
        this.viewType = viewType;
    }

    public int getPosition() {
        return position;
    }

    public void setPosition(int position) {
        this.position = position;
    }

    public String getImage219() {
        return image219;
    }

    public void setImage219(String image219) {
        this.image219 = image219;
    }

    public boolean isBig() {
        return isBig;
    }

    public void setBig(boolean big) {
        isBig = big;
    }

    public boolean isShowTopDivider() {
        return isShowTopDivider;
    }

    public void setShowTopDivider(boolean showTopDivider) {
        isShowTopDivider = showTopDivider;
    }

    public boolean isShowBottomDivider() {
        return isShowBottomDivider;
    }

    public void setShowBottomDivider(boolean showBottomDivider) {
        isShowBottomDivider = showBottomDivider;
    }

    @Override
    public String getShareTitle() {
        return name;
    }

    @Override
    public String getShareH5() {
        return h5;
    }

    @Override
    public String getShareImage() {
        return UrlUtils.linkUrls(Constances.ST_BASE_URL, contentImage);
    }

    @Override
    public String getShareDigest() {
        return null;
    }

    @Override
    public String getShareURL() {
        if (TextUtils.isEmpty(contentImage)) {
            return h5;
        } else {
            return UrlUtils.linkUrls(Constances.ST_BASE_URL, contentImage);
        }
    }

    @Override
    public String getTime() {
        return null;
    }

    @Override
    public IListShowData getOwenerData() {
        return null;
    }

    @Override
    public String getDataTitle() {
        return null;
    }

    @Override
    public String getDataImg() {
        return null;
    }

    @Override
    public String getDataTag() {
        return null;
    }

    @Override
    public String getDataId() {
        return null;
    }

    @Override
    public int getDataType() {
        return 0;
    }

    @Override
    public int getDataViewType() {
        return viewType;
    }

    @Override
    public IListData getOwner() {
        return null;
    }
}
